﻿@{
    Layout = null;
    System.Data.DataTable ftplist = ViewData["ftplist"] == null ? new System.Data.DataTable() : ViewData["ftplist"] as System.Data.DataTable;
}
@using ElingOA6_DSJCJ.Models;
@using Webdiyer.WebControls.Mvc
@model PagedList<ElingOA6_DSJCJ.Model.FTP_New>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>@ElingOA6_DSJCJ.Common.GlobalConstant.CONSTRING_SYSTITLE</title>
    @if (false)
    {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
        <script src="../../../../Scripts/json2.js" type="text/javascript"></script>  
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <link type="text/css" href="@Url.Content("~/Content/style.css")" rel="stylesheet"  />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/framepage.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(

    new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }

    )
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox },
        new Script { ExtensionType = ExtensionType.UploadControl }
    )
    <link href="@Url.Content("~/Content/upload.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function querydept() {
            if ($("#isAgency").val() == "Y") {
                var querystr = "Filelook?FNoAgency=Y&Fyear=" + $('#yearSelect option:selected').val() + "&FMon=" + $('#monSelect option:selected').val();
            }
            else {
                var querystr = "Filelook?FDeptNo=" + $("#hdept").val() + "&Fyear=" + $('#yearSelect option:selected').val() + "&FMon=" + $('#monSelect option:selected').val();
            } window.location.href = querystr;
        }
    </script>
</head>
<body>
    <div class="main">
        @{Html.RenderAction("Top", "Index");}
        <div class="content">
            <div class="txxx">
                @Html.Raw(ViewData["FShowContent"].ToString())
                <div class="year-query">
                    <table width="500" border="0">
                        <tr>
                            <td width="18%" align="right">
                                年度：
                            </td>
                            <td width="13%">
                                <select name="yearSelect" id="yearSelect">
                                    @foreach (string year in ViewData["YearData"] as List<string>)
                                    {
                                        if (year == ViewData["selYear"].ToString())
                                        {
                                        <option selected="selected" value="@year">@year</option> 
                                        }
                                        else
                                        {
                                        <option  value="@year">@year</option> 
                                        }
                                    }
                                </select>
                            </td>
                            <td width="18%">
                                月份：
                            </td>
                            <td width="13%">
                                <select name="monSelect" id="monSelect">
                                    @foreach (string mon in ViewData["MonData"] as List<string>)
                                    {
                                        if (mon == ViewData["selMon"].ToString())
                                        {
                                        <option selected="selected" value="@mon">@mon</option> 
                                        }
                                        else
                                        {
                                        <option  value="@mon">@mon</option> 
                                        }
                                    }
                                </select>
                            </td>
                            <td width="18%">
                                <input name="" type="button" value="查询" onclick="querydept()" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="txxx-listdiv">
                    <div class="txxx-title">
                       <span style=" height:35px; line-height:35px; float:left; border-bottom:#A3C8E5 1px solid; background:#F3F9FF;color:#3B639F; font-size:14px; font-weight:bold; padding-left:2%;"> 上传文件列表</span><span style=" height:35px; line-height:35px; float:right; border-bottom:#A3C8E5 1px solid; background:#F3F9FF;color:#3B639F; font-size:14px; font-weight:bold; padding-left:2%;">上传时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="height:35px; line-height:35px; float:right; border-bottom:#A3C8E5 1px solid; background:#F3F9FF;color:#3B639F; font-size:14px; font-weight:bold; padding-left:2%;">上传人&nbsp;&nbsp</span></div>
                    <ul class="txxx-list">
                        @foreach (ElingOA6_DSJCJ.Model.FTP_New dr in Model as List<ElingOA6_DSJCJ.Model.FTP_New>)
                        {
                            string pubuser=@dr.FUserName.ToString();
                            if ((bool)ViewData["isall"])
                            { 
                            <li><a href="@Url.Content("~/Index/DlOne?ids=" + @dr.FID.ToString())" target="_blank" style="cursor: pointer; width:70%; white-space:nowrap; text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow: hidden;">
                                @(@dr.FName.ToString().Length > 65 ? @dr.FName.ToString().Substring(0, 65) + "..." : @dr.FName.ToString())</a><span>@dr.FDate.ToString("yyyy-MM-dd")</span><span>@pubuser&nbsp;&nbsp;&nbsp;</span></li>
                            }
                            else
                            { 
                            <li><a href="javascript:" target="_self" style="cursor: pointer; width:70%; white-space:nowrap; text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow: hidden;">@(@dr.FName.ToString().Length > 65 ? @dr.FName.ToString().Substring(0, 65) + "..." : @dr.FName.ToString())</a><span>@dr.FDate.ToString("yyyy-MM-dd")</span><span>@pubuser&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
                            }

                        }
                    </ul>
                    @{  if (@Model.Count > 0)
                        { 
                        <div class="txxx-page">
                            <div class="manu">
                                <span style="float: left; width: 40%;">共 @Model.TotalItemCount 条记录，页 @Model.CurrentPageIndex/@Model.TotalPageCount</span>
                                @Html.Pager(Model, new PagerOptions { ContainerTagName = "span", PageIndexParameterName = "id", AlwaysShowFirstLastPageNumber = true, HorizontalAlign = "right", FirstPageText = "首页", LastPageText = "末页" }, new { style = "" })
                            </div>
                        </div>
                        }
                    }
                </div>
            </div>
        </div>
        @Html.Hidden("hdept", ViewData["dept"])
        @Html.Hidden("isAgency", ViewData["isAgency"])
        @{Html.RenderAction("Bottom", "Index");}
    </div>
</body>
</html>
